package cn.tedu.ximart.server.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

import static cn.tedu.ximart.server.pojo.validation.BrandValidationConst.MESSAGE_PINYIN;
import static cn.tedu.ximart.server.pojo.validation.BrandValidationConst.REGEXP_PINYIN;

@Data
public class BrandAddNewDTO implements Serializable {

    @ApiModelProperty(value = "品牌数据名称")
    @NotBlank(message = "请输入有效的用户名11111")
    private String name;

    @ApiModelProperty(value = "品牌数据名称字母")
    @NotNull
    @Pattern(regexp =REGEXP_PINYIN,message=MESSAGE_PINYIN)
    private String pinyin;

    @ApiModelProperty(value = "品牌数据logo")
    private String logo;

    @ApiModelProperty(value = "品牌数据分类id")
    private Long categoryId;

    @ApiModelProperty(value = "品牌数据详情")
    private String description;

    @ApiModelProperty(value = "品牌数据关键字")
    @NotNull(message = "请输入用户密码")
    private String keywords;

    @ApiModelProperty(value = "品牌数据排序值")
    @NotNull
    @Range(max = 99,message = "请输入0-99之间的数值")
    private Integer sort;

}
